package com.wanggan.design.template;

/**
 * @author wanggan
 */
public abstract class LetterProcess {
    
    //首先要写信的内容
    protected abstract void writeContext(String context);
    
    //其次写信封
    protected abstract void fillEnvelope(String address);
    
    //把信放到信封里
    protected abstract void letterInotoEnvelope();
    
    //然后邮递
    protected abstract void sendLetter();
    
    public final void send(String context,String address){
        writeContext(context);
        fillEnvelope(address);
        letterInotoEnvelope();
        sendLetter();
    }
}
